import 'package:flutter/material.dart';

class  drawDemo extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Drawer(
      child: ListView(
        padding: EdgeInsets.zero,
        children: <Widget>[
          UserAccountsDrawerHeader(
            accountName: Text(
              "libin",
              style: TextStyle(color: Colors.black),
            ),
            accountEmail: Text("libin@163.com", style: TextStyle(color: Colors.black)),
            currentAccountPicture: CircleAvatar(
              backgroundImage: NetworkImage(
                  "https://graph.baidu.com/resource/112705a8d296229630f0501561366257.jpg"),
            ),
            decoration: BoxDecoration(
                color: Colors.blue,
                image: DecorationImage(
                    image: NetworkImage('https://graph.baidu.com/resource/112705a8d296229630f0501561366257.jpg'),
                    fit: BoxFit.cover)),
          ),
          ListTile(
            title: Text(
              "message",
              textAlign: TextAlign.right,
            ),
            trailing: Icon(Icons.message),
            onTap: ()=>
                Navigator.pop(context)
            ,
          ),
          ListTile(
            title: Text(
              "hearing",
              textAlign: TextAlign.right,
            ),
            trailing: Icon(Icons.hearing),
            onTap: ()=>
                Navigator.pop(context)
            ,
          ),
          ListTile(
            title: Text(
              "favorite",
              textAlign: TextAlign.right,
            ),
            trailing: Icon(Icons.favorite),
            onTap: ()=>
                Navigator.pop(context)
            ,
          )
        ],
      ),
    );
  }
}